package com.doeis.manage.action;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.doeis.core.SuperAction;

/**
 * 
 * @author wxy
 * @date 2016-1-6
 */
@WebServlet(urlPatterns = "/index/*")
public class IndexAction extends SuperAction {

	private static final long serialVersionUID = 1L;

	@Override
	protected void doRequest(String methodName, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		if ("index".equals(methodName)) {
			toIndex(request, response);
		} else {
			toPage(methodName, "index", request, response);
		}
	}

	/**
	 * 跳转到管理页面
	 * 
	 * @Title: toIndex
	 * @data:2014-1-6上午09:40:37
	 * @author:xieyan
	 *
	 * @param request
	 * @param response
	 */
	private void toIndex(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.getRequestDispatcher(PAGE_PATH + "/index/index.jsp").forward(request, response);
	}
}
